For every new project:
tr
macro (as you would do in Qt), optionally passing a context and/or a plural indicator (see Qt Assistant). Both string and context can be Lisp forms evaluating to constant strings.
my_app/eql-lupdate
file, adding your Qt Designer *.ui
files (if any), and listing the respective *.ts
files for all languages you want to support.
my_app/eql-lrelease
file, simply listing all *.ts
files (see above).
For every new release (in order to create the *.qm
files):
my_app/
, run eql make.lisp
(compiling all files). This will find all source strings to translate and save them in the file tr.h
(only a dummy needed for the Qt lupdate
function). This is done using a compiler macro, see my_app/tr.lisp
.
my_app/eql-lupdate
script; this will create/update the single *.ts
files for every language.
*.ts
files (as usual).
my_app/eql-lrelease
script.
Note: you may need to copy the respective qt_*.qm
files (see translations/
in the Qt sources), in order to load the translated texts used by Qt itself.
See my_app/main.cpp
for an example how to load your translation files.